<#include "/template/blog/header.ftl">
	<div class="banner border-top-bottom">
		<ul class="carousel">
			<@shishuo_headline_list_tag>
				<#list tag_headline_list as headline>
					<li class="item" style="background:#212e41 url('${BASE_PATH}/${headline.picture}') center no-repeat;height:250px;"></li>
					<#break />
				</#list>
			</@shishuo_headline_list_tag>
		</ul>
	</div>
	<br />
	<br />
	<div class="container">

	<div><ul class="bread"><li><a href="../index.htm" class="icon-home"> 首页</a></li><li>产品详情</li></ul></div>
    <br />

    <div class="line">
        <div class="xm4">
            <div class="picture border" align="center"> <#list product.pictureList as pic>
					<img src="${BASE_PATH}/${pic.url}" id="big" class="img-responsive">
					<#break/>
				</#list></div>
            <br />
            <div class="banner minipic hidden" data-item="5" data-style="border-blue">
              <ul class="carousel">
                <li class="item">
                <#list product.pictureList as pic>
					<img src="${BASE_PATH}/${pic.url}" id="big" class="img-responsive">
					<#break/>
				</#list></li>
              </ul>
            </div>
            <br /><br />
        </div>
        <div class="xm7 xm1-move">
            <h1>${product.productName} </h1>
            <hr />
            <p>您的专享价格: <span class="text-large text-main">￥${product.price}</span></p>
            <p>服务：由 本商城 发货，并提供售后服务</p>
            <p>赠品：免费送超值礼包</p>
            <hr /><br />
            <form method="get" action="/user/toBuy.htm" id="toBuyForm" class="form-inline">
            <input type="hidden" name="productId" value="${product.productId}">
            <input type="hidden" name="num" id="buyNum" value="1">
            <div class="form-group">
                <div class="label"><label for="quantity">数量：</label></div>
                <div class="field">
                	<div class="input-group"><span class="addbtn"><button type="button" class="button" onclick="add('quantity')">+</button></span><input type="text" class="input" id="quantity" size="3" value="1" /><span class="addbtn"><button type="button" class="button" onclick="reduce('quantity')">-</button></span></div>
                </div>
            </div>
            <div style="margin-top: 16px; ">
            	<a class="button border-main" id="toBuy" href="javascript:void(0)">立即购买</a>
            </div>
            </form>
            <br />
        </div>
    </div>
    
    <h2 class="text-main icon-caret-right"> 商品详情</h2>
    <hr />
    <div class="detail text-center">
    	<p>${product.content}</p>
    </div>
    
</div>

<script type="text/javascript">
function add(ids) {
    var num = document.getElementById(ids);
	num.value = parseInt(num.value) + 1;
	$("#buyNum").val(num.value);
};
function reduce(ids) {
    var num = document.getElementById(ids);
	if (parseInt(num.value)>1){
    	num.value = parseInt(num.value) - 1;
    	$("#buyNum").val(num.value);
	}
}
$("#toBuy").click(function(){
	$("#toBuyForm").submit();
})
</script>


	<#include "/template/blog/footer.ftl">